<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    /*借用构造器模式*/
    function SuperType() {// 父类
        this.name = "Lee";
        this.colors = ['white']

    }

    function SubType() { // 子类
         SuperType.call(this); // 借用构造器的方式
    }

    var sub1 = new  SubType();
    var sub2 = new  SubType();

    sub1.colors.push('black');
    sub2.colors.push('red');

    console.log(sub1.colors);
    console.log(sub2.colors);


</script>
</html>